/**
 * electron 工具类
 */

export const parseContent = (content) => {
    return content.split(/[\n]/)
};
export const getUser = ( userStr ) =>{
    return userStr.split("|")
}
//生成从minNum到maxNum的随机数
export const randomNum = (minNum, maxNum,isNendxMax ) =>{
    return isNendxMax ?
        Math.ceil(Math.random()*(maxNum - minNum) + minNum) :
        parseInt(Math.random()*(maxNum - minNum) + minNum, minNum);
}

export const sleep = ( time ) => {
    return new Promise((resolve) => setTimeout(resolve, time));
}
